package com.niit.service;

import com.niit.entity.Message;
import com.niit.entity.MessageObject;

import java.util.List;

/**
 * @author 张月
 * @apiNote
 */
public interface MessageService {
    //发送消息
    Message sendMessage(Message message);
    //获取聊天消息
    List<Message> getChatMessages(Integer senderId, Integer receiverId);
    //标记消息已读
    void markAsRead(Integer messageId);
    //删除消息
    void deleteMessage(Integer messageId);
    //根据发送者ID获取所有消息
    List<Message> findBySenderId(Integer senderId);
    // 检查拉黑状态
    boolean checkBlockStatus(Integer senderId, Integer receiverId);
    // 查找或创建对话关系
    MessageObject findOrCreateMessageObject(Integer senderId, Integer receiverId);
}
